package sardine.webserver;

import io.netty.handler.codec.http.FullHttpRequest;
import sardine.Access;
import sardine.QueryParamsMap;
import sardine.Request;
import sardine.Session;
import sardine.route.RouteMatched;

import java.util.Map;
import java.util.Set;

/**
 * @auth bruce_sha
 * @date 2015/5/21
 */
final class RequestWrapper /**/ extends Request  {

    private Request delegate;

    public void setDelegate(Request delegate) {
        this.delegate = delegate;
    }

    Request getDelegate() {
        return delegate;
    }

    public void changeMatch(RouteMatched match) {
        Access.changeMatch(delegate, match);
    }

    public String method() {
        return delegate.method();
    }


    public String scheme() {
        return delegate.scheme();
    }


    public int port() {
        return delegate.port();
    }


    public String pathInfo() {
        return delegate.pathInfo();
    }


    public String servletPath() {
        return delegate.servletPath();
    }


    public String contextPath() {
        return delegate.contextPath();
    }


    public String contentType() {
        return delegate.contentType();
    }


    public String body() {
        return delegate.body();
    }


    public byte[] bodyAsBytes() {
        return delegate.bodyAsBytes();
    }


    public int contentLength() {
        return delegate.contentLength();
    }


    public boolean equals(Object obj) {
        return delegate.equals(obj);
    }


    public int hashCode() {
        return delegate.hashCode();
    }


    public Map<String, String> params() {
        return delegate.params();
    }


    public String params(String param) {
        return delegate.params(param);
    }


    public String[] splats() {
        return delegate.splats();
    }


    public String host() {
        return delegate.host();
    }


    public String ip() {
        return delegate.ip();
    }


    public String queryParams(String queryParam) {
        return delegate.queryParams(queryParam);
    }


    public String headers(CharSequence header) {
        return delegate.headers(header);
    }


    public Set<String> queryParams() {
        return delegate.queryParams();
    }


    public Set<String> headers() {
        return delegate.headers();
    }


    public String queryString() {
        return delegate.queryString();
    }


    public FullHttpRequest raw() {
        return delegate.raw();
    }


    public String toString() {
        return delegate.toString();
    }


    public String userAgent() {
        return delegate.userAgent();
    }


    public String url() {
        return delegate.url();
    }


    public String uri() {
        return delegate.uri();
    }


    public String protocol() {
        return delegate.protocol();
    }


    public void attribute(String attribute, Object value) {
        delegate.attribute(attribute, value);
    }


    public Object attribute(String attribute) {
        return delegate.attribute(attribute);
    }


    public Set<String> attributes() {
        return delegate.attributes();
    }


    public Session session() {
        return delegate.session();
    }


    public Session session(boolean create) {
        return delegate.session(create);
    }


    public QueryParamsMap queryMap() {
        return delegate.queryMap();
    }


    public QueryParamsMap queryMap(String key) {
        return delegate.queryMap(key);
    }


    public Map<String, String> cookies() {
        return delegate.cookies();
    }


    public String cookie(String name) {
        return delegate.cookie(name);
    }


    public void rewrite(String uri) {
        delegate.rewrite(uri);
    }
}
